home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7664 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.uit.no!news
  2. From: magneoe@stud.cs.uit.no (Magne Oestlyngen)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Start and end address of memory
  5. Date: 20 Apr 96 05:39:44 +0100
  6. Organization: University of Tromsoe, Norway
  7. Message-ID: <1366.6684T339T2226@stud.cs.uit.no>
  8. References: <923.6682T1203T241@login.eunet.no>
  9. NNTP-Posting-Host: uit-or2.uit.no
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12. >This source:
  13. >printf("ln_Name = %s\n",SysBase->MemList.lh_TailPred->ln_Name);
  14. >printf("mh_Lower = $%x\n",((struct MemHeader*)SysBase->MemList.lh_TailPred)-
  15. >>mh_Lower);
  16. >printf("mh_Upper = $%x\n",((struct MemHeader*)SysBase->MemList.lh_TailPred)-
  17. >>mh_Upper);
  18. >Outputs:
  19. >ln_Name = chip memory
  20. >mh_Lower = $3020
  21. >mh_Upper = $200000
  22. >Now I have upper and lower bound of chip memory, but I want the start and stop
  23. >address. (meu_Addr and me_Length)
  24.  
  25. length = upper - lower
  26.  
  27. mh_Lower and mh_Upper _are_ the start and stop of your (allocatable) chipmem.
  28. Some (in your system, $3000) bytes are taken by exec before it is put in the
  29. freelist. The $20 bytes part, is the MemHeader.
  30.  
  31. If you really want the _real_ chipmem location, it starts at address 0 and is
  32. SysBase->MaxLocMem bytes long.
  33.  
  34. >Well.. Where are they. I cant find them anywhere in the SysBase->MemList.
  35. >Is the name a joke?
  36.  
  37. MemList's ans MemEntry's are something different, and doesn't have anything
  38. to do with SysBase->MemList (Yes, the name is a little misleading, but
  39. execbase.h _does_ say it is a struct List and not a struct MemList).
  40.  
  41.  
  42. >..    Patrick Hanevold - VR developer - patrick.hanevold@login.eunet.no   ///
  43.  
  44. ----
  45. ______________________________________________________________
  46. Magne Oestlyngen <magneoe@stud.cs.uit.no>, IRC #amiga: Magneoe
  47. THOR homepage: http://www.cs.uit.no/~kjelli/thor.html
  48.  
  49.